Tools Plus Pro
Volume Number: 15
Issue Number: 10
Column Tag: Programming
Tools Plus Pro Libraries + Framework
by Thurman Gillespy III, M.D., Seattle, WA
Mac Programming Fast and Easy
The Tools Plus Pro 5 libraries and (optional) application framework greatly simplify
the development of Macintosh applications and plug-ins. Tools Plus provides a high
level API that simplifies and consolidates many Mac OS toolbox routines. Tools Plus can
be programmed in C, C++, and Pascal, and covers the user interface and event
processing components of the Mac Toolbox. Tools Plus replaces the classic Macintosh
event loop with an event dispatcher. Tools Plus interface components include windows
(including dialogs, floating windows, and a tool bar), cursors, menus, pop-up menus,
buttons, scroll bars, sliders, panels, and list boxes. Tools Plus fully supports the
Appearance Manager, but even without it, Tools Plus can still develop great-looking
applications. Tools Plus supports most of the compilers in common use today.
Tools Plus is developed and distributed by Water's Edge Software, Ontario, Canada. A
fully featured evaluation kit (9.4M) and a smaller demo kit (676K) are available
online.
Water's Edge Software
<http://www.interlog.com/~wateredg/>
How I Use Tools Plus
I've been using Tools Plus since early 1996 for the development of a medical image
display program, Dr Razz. The program uses many Tools Plus interface components,
including the tool bar, floating windows, sliders, picture buttons, cursor tables, and
edit fields. Two great ways to see what Tools Plus can do are to carefully study the
Tools Plus Demo App (included in the evaluation and demo kits) to see all the user
interface components in action, and also to look at my program to see Tools Plus used to
develop a complete Macintosh application.
Dr Razz
<http://www.dr-razz.com/>
The Out of Box Experience
The Tools Plus distribution includes the Tools Plus 680x0 and PPC libraries for
C/C++ and Pascal. Separate libraries for applications and plug-ins are included. The
680x0 libraries have both large and small code model versions. Also included is an
application framework, actually a stub application outline. Tools Plus supports
CodeWarrior (as far back as version 6), CodeWarrior Pro, Symantec C/C++, THINK
C, and THINK Pascal, and separate libraries and project files are included for these
systems.
Extras include a printed and electronic user manual (in both eDoc and PDF formats)
and 11 different tutorial projects that illustrate a particular Tools Plus feature. A
demo application (the Tools Plus Demo App) and source code are included that nicely
illustrate the Tools Plus event model and user interface components.
Tools Plus also ships with SuperCDEFs, a nice collection of 3D user interface
components that you can use to develop a great-looking user interface without the
Appearance Manager. SuperCDEFs includes buttons, sliders, tabs, hierarchy triangles,
and progress thermometers.
Figure 1.Some of the many SuperCDEFs components.
Also bundled are the Infinity Windoid WDEF, miscellaneous icons, animated cursors,
fonts, and other resources.
Figure 2.A floating window created with the Infinity Windoid WDEF.
Tools Plus Professional retails for $249, and includes a one year subscription with
three annual updates, as well as a license to include the libraries in your finished
product. The subscription also includes e-mail access to the Tools Plus Developer
Forum, Water's Edge News, and technical support. Support questions are usually
promptly answered. Bug notices are automatically e-mailed to registered developers,
which is a very nice service. Tools Plus Lite (680x0 libraries for CodeWarrior only)
is available for a limited time for $99. Academic discounts are available. Tools Plus
Pro and Tools Plus Lite are available from Water's Edge and Developer Depot.
Some Assembly Required
So how do you develop an application or plug-in with Tools Plus? A great place to get
started is to use the sample project and the application framework files appropriate
for your development system. The application framework is composed of 8 files (and
associated headers) that form a basic application shell, with lots of "insert your code
here to handle..." comments. The framework is entirely optional, and you can use your
own coding style as you see fit.
You can divide project development into the following steps.
1. develop DLOG, MENU and other resources for user interface
2. write your application specific initialization routines
3. all InitToolsPlus with appropriate parameters
4. write the application event handler
5. write event handlers for each window type (optional, but highly
recommended)
6. write the event filter (optional, but the recommended method of
performing menu updates)
7. write routines to handle application and window events
8. link the appropriate Tools Plus library/libraries for your development
system
9. compile and enjoy!
Batteries Not Included
Tools Plus is not a complete application/plug-in development environment, although
the libraries handle most of the event processing and user interface aspects of an
application or plug-in. There is no support for memory management (except for edit
fields), file operations, open/save file dialogs, low-level debug support, or network
operations. Support for balloon help is incomplete, and is completely absent for
standard algorithms such as linked lists. There is no Tools Plus API support for print
operations, but the application framework has useful print starter code. Tools Plus
does not come with an interface editor like CodeWarrior Constructor, REALbasic or
AppMaker - for serious work you will need Resorcerer from Mathemaesthetics. Tools
Plus has basic list box support, but Water's Edge recommends purchasing
StoneTable[TM] from StoneTablet Publishing for advanced list box operations. For
advanced text handling and display you should consider the popular WASTE text-editing
library from Marco Piovanelli, and for file operations you should consider the
MoreFiles routines from Jim Luther.
<http://www.mathemaesthetics.com/>
StoneTable[TM]
<http://www.teleport.com/~stack/>
WASTE
<http://www.merzwaren.com/waste/>
MoreFiles
<http://members.aol.com/jumplong/>
USING The Tools Plus System
The Tools Plus libraries handle events and manage the Tools Plus interface
components. To get started, you initialize the libraries, then let them begin processing